﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using FanaticInstaller.Utils;

namespace FanaticInstaller
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : NavigationWindow
    {
        public MainWindow()
        {
            InitializeComponent();
            NavigationRegister.Navigatlize(this);
            this.Navigated += MainWindow_Navigated;
        }

        private void MainWindow_Navigated(object sender, NavigationEventArgs e)
        {
            if (e.Content is FrameworkElement content)
            {
                content.DataContext = DataContext;
            }
        }
    }
}
